import 'package:flutter_common_utils/common_utils_export.dart';

extension ListNullExtension<T> on List<T>? {}

extension StringExt on String {}

extension NumExt on num {}

main() {
  final list = [1, 2, 3, 4, 5];
  final result = list.firstWhereX((element) => element > 13);
  print(result);

  final List<Map<String, dynamic>> items = [
    {'name': 'Alice', 'age': 30, 'ccc': false},
    {'name': 'Bob', 'age': 25, 'ccc': false},
    {'name': 'David', 'age': 35, 'ccc': true},
    {'name': 'Charlie', 'age': null, 'ccc': null},
  ];

  final List<Map<String, dynamic>> sortedItems = items.sortedBy((item) => item['age'] as num?);

  print(sortedItems);
  print("dddddddd ${10.3000.toFormat45(2)}");
  print("dddddddd ${null.toString()}");
}
